using System;
using Game.AI.Common;
using Game.Graph;
using Unity.Entities;

namespace Game.AI.HFSM
{
    // public unsafe interface IFSM_Status
    // {
    //     public void OnEnter(Entity entity, HFSM_Data* data);
    //     public void OnUpdate(Entity entity, HFSM_Data* data);
    //     public void OnExit(Entity entity, HFSM_Data* data);
    // }


    // public unsafe interface IHFSM_Status : IFSM_Status
    // {
    //     public BlobArray<AIActionPtr> Enter { get; }
    //     public BlobArray<AIActionPtr> Update { get; }
    //     public BlobArray<AIActionPtr> Exit { get; }
    //     public BlobArray<HFSM_Status> Children { get; }
    //     public HFSM_Status* Parent { get; }
    // }

    [Serializable]
    public unsafe struct HFSM_Graph
    {
        public BlobArray<HFSM_Status> states;
    }

    [Serializable]
    public unsafe struct HFSM_Status : IGraphNode
    {
        public BlobString Name;
        public BlobArray<AIActionMeta> Enter;
        public BlobArray<AIActionMeta> Update;
        public BlobArray<AIActionMeta> Exit;
        
        public BlobPtr<HFSM_Status> Parent;
        public BlobArray<BlobPtr<HFSM_Status>> Children;
    }
}